package com.rmb.service;

import com.rmb.mart.entity.userinfo.UserCompany;
import com.rmb.request.UserCompanyRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * (UserCompany)表服务接口
 *
 * @author makejava
 * @since 2021-01-20 14:10:31
 */
public interface UserCompanyService {


    /**
     * 查询企业列表
     * @return List<UserCompany>
     */
    List<UserCompany> findList();

    /**
     * 添加企业并上传企业执照
     * @param userCompany
     * @return
     */
    UserCompany addBusiness(UserCompany userCompany);

    /**
     * 修改企业信息
     * @param userCompany
     * @return
     */
    UserCompany updateBusiness(@Param("userCompany") UserCompany userCompany);

    /**
     * 删除企业信息
     * @param id
     * @return
     */
    UserCompany deleteUserCompany(@Param("id") Long id);

    /**
     * 上传图片
     * @param file
     * @return 图片路径
     */
    String uploadLicense(MultipartFile file);

    /**
     * 查询待审核的企业
     * @param status
     * @return
     */
    List<UserCompany> findByStatus(Integer status);

    /**
     * 修改转态未审核未通过并发送消息提示用户
     * @param userCompanyRequest
     * @return
     */
    int auditFailed(UserCompanyRequest userCompanyRequest);
}